VIVE 3DSP Native C Library  ver 1.0.0.0
Audio 3DSP (3D Sound Perception) Native C Library
Related Functions
vive_3dsp_dopplersource Struct Reference

The vive_3dsp_dopplersource structure represents the doppler effect of a moving audio source. More...

#include <vive_3dsp_api/doppler_source.h>

Related Functions

(Note that these are not member functions.)

vive_3dsp_dopplersource * vive_3dsp_dopplersource_create_object (vive_3dsp_context *api, VIVE_3DSP_CHANNELTYPE type, int sampleRate)
 
VIVE_3DSP_API_STATUS vive_3dsp_dopplersource_destroy_object (vive_3dsp_context *api, vive_3dsp_dopplersource *src)
 
VIVE_3DSP_API_STATUS vive_3dsp_dopplersource_set_buffer (vive_3dsp_context *api, vive_3dsp_dopplersource *src, float *data, unsigned int size)
 
VIVE_3DSP_API_STATUS vive_3dsp_dopplersource_set_position (vive_3dsp_context *api, vive_3dsp_dopplersource *src, VIVE_3DSP_Vector3 pos)
 
VIVE_3DSP_API_STATUS vive_3dsp_dopplersource_set_order (vive_3dsp_context *api, vive_3dsp_dopplersource *src, int order)
 
VIVE_3DSP_API_STATUS vive_3dsp_dopplersource_process (vive_3dsp_context *api, vive_3dsp_dopplersource *src, float *out_buffer, int sampleLength)
 

Detailed Description

The vive_3dsp_dopplersource structure represents the doppler effect of a moving audio source.

Friends And Related Function Documentation

◆ vive_3dsp_dopplersource_create_object()

vive_3dsp_dopplersource * vive_3dsp_dopplersource_create_object ( vive_3dsp_context *  api,
VIVE_3DSP_CHANNELTYPE  type,
int  sampleRate 
)
related

Create a audio source object specifically for doppler effect.

Parameters
apiThe audio engine object.
typeInput channel type. CHANNELTYPE_MONO for mono and CHANNELTYPE_STEREO for stereo.
sampleRateSample frequency of the audio source in Hz.
Returns
Doppler source object.

◆ vive_3dsp_dopplersource_destroy_object()

VIVE_3DSP_API_STATUS vive_3dsp_dopplersource_destroy_object ( vive_3dsp_context *  api,
vive_3dsp_dopplersource *  src 
)
related

Destroy the specific audio source object.

Parameters
apiThe audio engine object.
srcThe audio source object created by vive_3dsp_dopplersource_create_object.
Returns
Status code indicating whether or not the operation succeeded.

◆ vive_3dsp_dopplersource_process()

VIVE_3DSP_API_STATUS vive_3dsp_dopplersource_process ( vive_3dsp_context *  api,
vive_3dsp_dopplersource *  src,
float *  out_buffer,
int  sampleLength 
)
related

Generate the audio data with doppler effect. Note that the original data should be set by vive_3dsp_dopplersource_set_buffer in advance.

Parameters
apiThe audio engine object.
srcThe audio source object created by vive_3dsp_dopplersource_create_object.
out_bufferThe output buffer.
sampleLengthThe output size in sample length.
Returns
Status code indicating whether or not the operation succeeded.

◆ vive_3dsp_dopplersource_set_buffer()

VIVE_3DSP_API_STATUS vive_3dsp_dopplersource_set_buffer ( vive_3dsp_context *  api,
vive_3dsp_dopplersource *  src,
float *  data,
unsigned int  size 
)
related

Set the audio clip.

Parameters
apiThe audio engine object.
srcThe audio source object created by vive_3dsp_dopplersource_create_object.
dataAudio data.
sizeSize of the audio data in byte.
Returns
Status code indicating whether or not the operation succeeded.

◆ vive_3dsp_dopplersource_set_order()

VIVE_3DSP_API_STATUS vive_3dsp_dopplersource_set_order ( vive_3dsp_context *  api,
vive_3dsp_dopplersource *  src,
int  order 
)
related

Set the order of the doppler effect.

Parameters
apiThe audio engine object.
srcThe audio source object created by vive_3dsp_dopplersource_create_object.
orderThe doppler effect order. The higher order leads to larger amount of frequency variation. 0 for no effect.
Returns
Status code indicating whether or not the operation succeeded.

◆ vive_3dsp_dopplersource_set_position()

VIVE_3DSP_API_STATUS vive_3dsp_dopplersource_set_position ( vive_3dsp_context *  api,
vive_3dsp_dopplersource *  src,
VIVE_3DSP_Vector3  pos 
)
related

Set the position of the audio source object.

Parameters
apiThe audio engine object.
srcThe audio source object created by vive_3dsp_dopplersource_create_object.
posThe position.
Returns
Status code indicating whether or not the operation succeeded.

The documentation for this struct was generated from the following file: